<template>
  <div class="table-container">
    <a-table
      v-bind="tableProps"
      :data-source="[
        {
          number: '反馈内容反馈内容反馈内容',
          first_name: 'Bob',
          last_name: 'Alice',
          email: 'abc123@xx.com',
          mobile: '04 1234 1234',
          time: '2021-10-13 15:00:00',
          status: '未处理',
          id: 'xxxxxxxx'
        }
      ]"
    >
      <template #status="text, row">
        <a @click.prevent="handlerRow(row)">{{ text }}</a>
      </template>
    </a-table>
  </div>
</template>
<script>
import Actions from './Actions.vue'
import table from '@/utils/mixins/search/table'

export default {
  mixins: [table],

  components: {
    Actions,
  },

  data () {
    return {
      columns: [
        {
          title: '反馈内容',
          dataIndex: 'number',
        },
        {
          title: '名',
          dataIndex: 'first_name',
          ellipsis: true,
        },
        {
          title: '性',
          dataIndex: 'last_name',
          ellipsis: true,
        },
        {
          title: '电子邮箱',
          dataIndex: 'email',
          ellipsis: true,
        },
        {
          title: '电话号码',
          dataIndex: 'mobile',
          ellipsis: true,
        },
        {
          title: '反馈时间',
          dataIndex: 'time',
          ellipsis: true,
        },
        {
          title: '处理状态',
          dataIndex: 'status',
          ellipsis: true,
          scopedSlots: { customRender: 'status' },
        }
      ],
    }
  },

  methods: {
    // 详情
    handlerRow({ id }) {
      this.$router.push({
        name: 'FeedbackContent',
        params: { id }
      })
    }
  },
}
</script>

<style lang="scss" scoped>
</style>
